const express = require('express');
// 引入数据库模块
const db = require('./db/index');
// 引入模型对象 
const Students = require('./models/data');
const app = express();

(async () => {
    await db;
    const res = await Students.create({
        name: 'lisa',
        age: 18,
        sex: '女',
        stu_id: '66',
        createDate: Date.now(),
        like: '唱歌画画睡觉'
    });
    console.log(res);
})()


app.listen(6060, err => {
    if (!err) console.log('server 启动！！！');
    else console.log(err);
})
